package com.campus.service.impl;

import com.campus.entity.TCourse;
import com.campus.mapper.CourseMapper;
import com.campus.service.ICourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CourseServiceImpl implements ICourseService {

    @Autowired
    private CourseMapper courseMapper;
    @Override
    public int createCourse(Integer id, String courseName, String status, Integer activityId, Integer teacherId, Integer classId) {

        TCourse tCourse = new TCourse();
        tCourse.setActivityId(activityId);
        tCourse.setClassId(classId);
        tCourse.setCourseName(courseName);
        tCourse.setId(id);
        tCourse.setStatus(status);
        tCourse.setTeacherId(teacherId);

        return courseMapper.createCourse(tCourse);
    }
}
